package speed;

public class ObjectMethod {
	public static void main(String[] args) {
		person02 person02 = new person02();
		person02.age = 18;
		person02.name = "baba";
		person02.method(person02);
		System.out.println(person02.age+"\t"+person02.name);
		System.out.println("-----------------------------------------------------------");
		person03 person03 = new person03();
		person03.age = 20;
		person03.name = "ba";
		person03.method(person03);
		System.out.println(person03.age+"\t"+person03.name);
	}
}

class person02{
	String name;
	int age;
	 void method(person02 p){
		p.age = 12;
		p.name = "L";
	}
}
class person03{
	String name;
	int age;
	 void method(person03 p){
		 p = null;
	}
	
}

